Skip to content

fix(dock): remove fixed gap between taskmanager and tray on overflow - #1904

Closed
mhduiy wants to merge 1 commit into
release/deepin25.0.10from
agent/bot/95bca9aaaec6
Closed

mhduiy wants to merge 1 commit into
release/deepin25.0.10from
agent/bot/95bca9aaaec6

Conversation

@mhduiy

@mhduiy mhduiy commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

修复内容

移植 commit cb9a865(BUG-355833)方案,消除经典模式溢出时任务管理器与托盘区域的 18px 固定空白。

根因

dockLeftSpaceForCenter 计算为整个屏幕剩余宽度而非任务管理器实际可用空间,导致 LeftAlignment 溢出模式下 dockCenterPart 预留空间比可见内容多 18px。

修复方案

  1. 将 dockLeftSpaceForCenter 替换为动态计算的 dockRemainingSpaceForCenter(扣除其他中心区域插件占用空间)
  2. 简化 dockCenterPart.implicitWidth 为 centerLoader.implicitWidth
  3. 增加 delegate 宽度按可用空间均分收缩逻辑

影响范围

  • 经典模式溢出场景:消除任务管理器与托盘之间的多余空白
  • 经典模式非溢出场景:行为不变
  • 时尚模式:布局不受影响

关联

Multica Issue: DDE-750

PMS: BUG-384747

Summary by Sourcery

Eliminate excess spacing in classic dock overflow layouts while preserving non-overflow and fashionable-mode behavior.

Bug Fixes:

  • Remove the fixed overflow gap between the task manager and system tray in classic dock mode.

Enhancements:

  • Calculate task manager space from the actual remaining center-region capacity and proportionally shrink app delegates when space is limited.

Port the verified fix from commit cb9a865 (BUG-355833) to eliminate
the 18px fixed gap that appears between the task manager and tray area
in classic mode when overflow occurs.

Root cause: dockLeftSpaceForCenter calculated the full screen remaining
width instead of the taskmanager's actual available space, causing
dockCenterPart to reserve more space than visible content in
LeftAlignment overflow mode.

Fix: replace dockLeftSpaceForCenter with a dynamic
dockRemainingSpaceForCenter that subtracts other center applets'
occupied space; simplify dockCenterPart.implicitWidth to
centerLoader.implicitWidth; add delegate width shrink logic to
distribute available space among app items.

Log: fix extra gap between task manager and tray area in classic mode overflow
Influence: classic mode overflow layout, classic mode non-overflow layout, fashion mode layout stability

PMS: BUG-384747
@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Reviewer's Guide

UI

Compute the task manager’s available center space, use it to size and shrink its app delegates, and let the center container reflect the resulting content size so overflow no longer leaves a fixed gap before the tray.

  • panels/dock/package/main.qml L21-39, L44 (removed lines), L470-471
  • panels/dock/taskmanager/package/TaskManager.qml L34-41, L120-137 (+3 small edits)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@mhduiy

mhduiy commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

产品确认此问题为正确设计,无需修复,关闭此PR

@mhduiy mhduiy closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants